<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<!-- Module day14 -->
		<title>day14 删除stu信息</title>
		<script src="../JQuery/jquery-3.6.0.min.js"></script>
		<script>
			function n_fnde(){
				$.ajax({
					url:"http://localhost:8080/stu/delete",
					data:$("#9_formDel").serialize(),
					
					success:function(data){
						$("#9_h5_1").text(JSON.stringify(data));
						console.log("delete success!");
					},
					error:function(data){
						$("#9_h5_1").text(JSON.stringify(data));
						console.log("delete fail!");
					}
					
				})
			}
			
		</script>
	</head>
	<body>
		<h5 id="9_h5_1">9_h5_1 显示删除是否成功</h5>

		<div>
			<form method="post" action="#" id="9_formDel">
				<table>
					<tr>
						<td colspan="2">
							<span>如果要删除该学生信息，请在下方输入:</span>
						</td>
					</tr>
					<tr>
						<td>
							id:
						</td>
						<td>
							<input type="text" name="id" />
						</td>
					</tr>
					<tr>
						<td>
							name:
						</td>
						<td>
							<input type="text" name="name" />
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<input type="button" value="确认删除" onclick="n_fnde();" />
							<input type="reset" value="重置" name="resetDel" />
						</td>
					</tr>

				</table>

			</form>
		</div>

	</body>
</html>
